diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 81331cd..fc25922 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -61,11 +61,11 @@
 		{
 			$form .= form_hidden($hidden);
 		}
-	
+
 		return $form;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -78,7 +78,7 @@
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
  * @return	string
- */	
+ */
 if ( ! function_exists('form_open_multipart'))
 {
 	function form_open_multipart($action, $attributes = array(), $hidden = array())
@@ -87,7 +87,7 @@
 		return form_open($action, $attributes, $hidden);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -100,7 +100,7 @@
  * @param	mixed
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_hidden'))
 {
 	function form_hidden($name, $value = '')
@@ -111,17 +111,17 @@
 		}
 
 		$form = '';
-		
+
 		foreach ($name as $name => $value)
 		{
 			$form .= "\n";
 			$form .= '<input type="hidden" name="'.$name.'" value="'.form_prep($value).'" />';
 		}
-	
+
 		return $form;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -132,7 +132,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_input'))
 {
 	function form_input($data = '', $value = '', $extra = '')
@@ -142,7 +142,7 @@
 		return "<input "._parse_form_attributes($data, $defaults).$extra." />";
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -155,7 +155,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_password'))
 {
 	function form_password($data = '', $value = '', $extra = '')
@@ -169,7 +169,7 @@
 		return form_input($data, $value, $extra);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -182,7 +182,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_upload'))
 {
 	function form_upload($data = '', $value = '', $extra = '')
@@ -196,7 +196,7 @@
 		return form_input($data, $value, $extra);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -207,13 +207,13 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_textarea'))
 {
 	function form_textarea($data = '', $value = '', $extra = '')
 	{
 		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'cols' => '90', 'rows' => '12');
-	
+
 		if ( ! is_array($data) OR ! isset($data['value']))
 		{
 			$val = $value;
@@ -223,11 +223,11 @@
 			$val = $data['value']; 
 			unset($data['value']); // textareas don't use the value attribute
 		}
-		
+
 		return "<textarea "._parse_form_attributes($data, $defaults).$extra.">".$val."</textarea>";
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -239,7 +239,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_dropdown'))
 {
 	function form_dropdown($name = '', $options = array(), $selected = array(), $extra = '')
@@ -248,7 +248,7 @@
 		{
 			$selected = array($selected);
 		}
-		
+
 		// If no selected state was submitted we will attempt to set it automatically
 		if (count($selected) === 0)
 		{
@@ -269,18 +269,18 @@
 		{
 			$key = (string) $key;
 			$val = (string) $val;
-		
+
 			$sel = (in_array($key, $selected))?' selected="selected"':'';
-		
+
 			$form .= '<option value="'.$key.'"'.$sel.'>'.$val."</option>\n";
 		}
 
 		$form .= '</select>';
-	
+
 		return $form;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -292,17 +292,17 @@
  * @param	bool
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_checkbox'))
 {
 	function form_checkbox($data = '', $value = '', $checked = FALSE, $extra = '')
 	{
 		$defaults = array('type' => 'checkbox', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
-	
+
 		if (is_array($data) AND array_key_exists('checked', $data))
 		{
 			$checked = $data['checked'];
-		
+
 			if ($checked == FALSE)
 			{
 				unset($data['checked']);
@@ -312,7 +312,7 @@
 				$data['checked'] = 'checked';
 			}
 		}
-	
+
 		if ($checked == TRUE)
 		{
 			$defaults['checked'] = 'checked';
@@ -325,7 +325,7 @@
 		return "<input "._parse_form_attributes($data, $defaults).$extra." />";
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -337,7 +337,7 @@
  * @param	bool
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_radio'))
 {
 	function form_radio($data = '', $value = '', $checked = FALSE, $extra = '')
@@ -351,7 +351,7 @@
 		return form_checkbox($data, $value, $checked, $extra);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -383,7 +383,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_reset'))
 {
 	function form_reset($data = '', $value = '', $extra = '')
@@ -404,19 +404,19 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_button'))
 {
 	function form_button($data = '', $content = '', $extra = '')
 	{
 		$defaults = array('name' => (( ! is_array($data)) ? $data : ''), 'type' => 'submit');
-		
+
 		if ( is_array($data) AND isset($data['content']))
 		{
 			$content = $data['content'];
 			unset($data['content']); // content is not an attribute
 		}
-		
+
 		return "<button "._parse_form_attributes($data, $defaults).$extra.">".$content."</button>";
 	}
 }
@@ -431,19 +431,19 @@
  * @param	string	The id the label applies to
  * @param	string	Additional attributes
  * @return	string
- */	
+ */
 if ( ! function_exists('form_label'))
 {
 	function form_label($label_text = '', $id = '', $attributes = array())
 	{
 
 		$label = '<label';
-	
+
 		if ($id != '')
 		{
 			 $label .= " for=\"$id\"";
 		}
-		
+
 		if (is_array($attributes) AND count($attributes) > 0)
 		{
 			foreach ($attributes as $key => $val)
@@ -469,7 +469,7 @@
  * @param	string	The legend text
  * @param	string	Additional attributes
  * @return	string
- */	
+ */
 if ( ! function_exists('form_fieldset'))
 {
 	function form_fieldset($legend_text = '', $attributes = array())
@@ -477,9 +477,9 @@
 		$fieldset = "<fieldset";
 
 		$fieldset .= _attributes_to_string($attributes, FALSE);
-	
+
 		$fieldset .= ">\n";
-	
+
 		if ($legend_text != '')
 		{
 			$fieldset .= "<legend>$legend_text</legend>\n";
@@ -497,7 +497,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_fieldset_close'))
 {
 	function form_fieldset_close($extra = '')
@@ -505,7 +505,7 @@
 		return "</fieldset>".$extra;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -514,7 +514,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_close'))
 {
 	function form_close($extra = '')
@@ -522,7 +522,7 @@
 		return "</form>".$extra;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -533,7 +533,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_prep'))
 {
 	function form_prep($str = '')
@@ -545,17 +545,17 @@
 			{
 				$str[$key] = form_prep($val);
 			}
-		
+
 			return $str;
 		}
-	
+
 		if ($str === '')
 		{
 			return '';
 		}
 
 		$temp = '__TEMP_AMPERSANDS__';
-	
+
 		// Replace entities to temporary markers so that 
 		// htmlspecialchars won't mess them up
 		$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
@@ -564,13 +564,13 @@
 		$str = htmlspecialchars($str);
 
 		// In case htmlspecialchars misses these.
-		$str = str_replace(array("'", '"'), array("&#39;", "&quot;"), $str);	
-	
+		$str = str_replace(array("'", '"'), array("&#39;", "&quot;"), $str);
+
 		// Decode the temp markers back to entities
 		$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
-		$str = preg_replace("/$temp(\w+);/","&\\1;",$str);	
-	
-		return $str;	
+		$str = preg_replace("/$temp(\w+);/","&\\1;",$str);
+
+		return $str;
 	}
 }
 
@@ -586,7 +586,7 @@
  * @access	public
  * @param	string
  * @return	mixed
- */	
+ */
 if ( ! function_exists('set_value'))
 {
 	function set_value($field = '', $default = '')
@@ -597,10 +597,10 @@
 			{
 				return $default;
 			}
-			
+
 			return $_POST[$field];
 		}
-		
+
 		return $OBJ->set_value($field, $default);
 	}
 }
@@ -618,7 +618,7 @@
  * @param	string
  * @param	bool
  * @return	string
- */	
+ */
 if ( ! function_exists('set_select'))
 {
 	function set_select($field = '', $value = '', $default = FALSE)
@@ -635,9 +635,9 @@
 				}
 				return '';
 			}
-	
+
 			$field = $_POST[$field];
-			
+
 			if (is_array($field))
 			{
 				if ( ! in_array($value, $field))
@@ -652,10 +652,10 @@
 					return '';
 				}
 			}
-				
+
 			return ' selected="selected"';
 		}
-		
+
 		return $OBJ->set_select($field, $value, $default);
 	}
 }
@@ -673,7 +673,7 @@
  * @param	string
  * @param	bool
  * @return	string
- */	
+ */
 if ( ! function_exists('set_checkbox'))
 {
 	function set_checkbox($field = '', $value = '', $default = FALSE)
@@ -690,7 +690,7 @@
 				}
 				return '';
 			}
-	
+
 			$field = $_POST[$field];
 			
 			if (is_array($field))
@@ -707,10 +707,10 @@
 					return '';
 				}
 			}
-				
+
 			return ' checked="checked"';
 		}
-		
+
 		return $OBJ->set_checkbox($field, $value, $default);
 	}
 }
@@ -728,7 +728,7 @@
  * @param	string
  * @param	bool
  * @return	string
- */	
+ */
 if ( ! function_exists('set_radio'))
 {
 	function set_radio($field = '', $value = '', $default = FALSE)
@@ -745,7 +745,7 @@
 				}
 				return '';
 			}
-	
+
 			$field = $_POST[$field];
 			
 			if (is_array($field))
@@ -762,10 +762,10 @@
 					return '';
 				}
 			}
-				
+
 			return ' checked="checked"';
 		}
-		
+
 		return $OBJ->set_radio($field, $value, $default);
 	}
 }
@@ -783,7 +783,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('form_error'))
 {
 	function form_error($field = '', $prefix = '', $suffix = '')
@@ -792,7 +792,7 @@
 		{
 			return '';
 		}
-		
+
 		return $OBJ->error($field, $prefix, $suffix);
 	}
 }
@@ -809,7 +809,7 @@
  * @param	string
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('validation_errors'))
 {
 	function validation_errors($prefix = '', $suffix = '')
@@ -818,7 +818,7 @@
 		{
 			return '';
 		}
-				
+
 		return $OBJ->error_string($prefix, $suffix);
 	}
 }
@@ -834,7 +834,7 @@
  * @param	array
  * @param	array
  * @return	string
- */	
+ */
 if ( ! function_exists('_parse_form_attributes'))
 {
 	function _parse_form_attributes($attributes, $default)
@@ -849,21 +849,22 @@
 					unset($attributes[$key]);
 				}
 			}
-		
+
 			if (count($attributes) > 0)
-			{	
+			{
 				$default = array_merge($default, $attributes);
 			}
 		}
-	
+
 		$att = '';
+
 		foreach ($default as $key => $val)
 		{
 			if ($key == 'value')
 			{
 				$val = form_prep($val);
 			}
-	
+
 			$att .= $key . '="' . $val . '" ';
 		}
 
@@ -882,43 +883,43 @@
  * @param	mixed
  * @param	bool
  * @return	string
- */	
+ */
 if ( ! function_exists('_attributes_to_string'))
 {
 	function _attributes_to_string($attributes, $formtag = FALSE)
 	{
-	   if (is_string($attributes) AND strlen($attributes) > 0)
-	   {
-		   if ($formtag == TRUE AND strpos($attributes, 'method=') === FALSE)
-		   {
-			  $attributes .= ' method="post"';
-		   }
-		   
-		   return ' '.$attributes;	   
-	   }
-	
-	   if (is_object($attributes) AND count($attributes) > 0)
-	   {
-		  $attributes = (array)$attributes;
-	   }
-	   
-	   if (is_array($attributes) AND count($attributes) > 0)
-	   {
-		  $atts = '';
+		if (is_string($attributes) AND strlen($attributes) > 0)
+		{
+			if ($formtag == TRUE AND strpos($attributes, 'method=') === FALSE)
+			{
+				$attributes .= ' method="post"';
+			}
 
-		  if ( ! isset($attributes['method']) AND $formtag === TRUE)
-		  {
-			 $atts .= ' method="post"';
-		  }
+		return ' '.$attributes;
+		}
 	
-		  foreach ($attributes as $key => $val)
-		  {
-			 $atts .= ' '.$key.'="'.$val.'"';
-		  }
+		if (is_object($attributes) AND count($attributes) > 0)
+		{
+			$attributes = (array)$attributes;
+		}
 
-		  return $atts;
-	   }
-	} 
+		if (is_array($attributes) AND count($attributes) > 0)
+		{
+		$atts = '';
+
+		if ( ! isset($attributes['method']) AND $formtag === TRUE)
+		{
+			$atts .= ' method="post"';
+		}
+
+		foreach ($attributes as $key => $val)
+		{
+			$atts .= ' '.$key.'="'.$val.'"';
+		}
+
+		return $atts;
+		}
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -931,28 +932,28 @@
  *
  * @access	private
  * @return	mixed
- */	
+ */
 if ( ! function_exists('_get_validation_object'))
-{	
+{
 	function &_get_validation_object()
 	{
 		$CI =& get_instance();
-		
+
 		// We set this as a variable since we're returning by reference
 		$return = FALSE;
-		
+
 		if ( ! isset($CI->load->_ci_classes) OR  ! isset($CI->load->_ci_classes['form_validation']))
 		{
 			return $return;
 		}
-		
+
 		$object = $CI->load->_ci_classes['form_validation'];
-		
+
 		if ( ! isset($CI->$object) OR ! is_object($CI->$object))
 		{
 			return $return;
 		}
-		
+
 		return $CI->$object;
 	}
 }
